package com.longyi.admin.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDateTime;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 文件
 * </p>
 *
 * @author 龙毅
 * @since 2025-08-27
 */
@Getter
@Setter
@TableName("file")
@ApiModel(value = "File对象", description = "文件")
public class File implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("主键")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty("文件名称")
    @TableField("name")
    private String name;

    @ApiModelProperty("文件类型")
    @TableField("type")
    private String type;

    @ApiModelProperty("文件大小(kb)")
    @TableField("size")
    private Long size;

    @ApiModelProperty("下载链接")
    @TableField("url")
    private String url;

    @ApiModelProperty("0：删除/禁用，1：正常")
    @TableField("status")
    private Integer status;

    @ApiModelProperty("上传时间")
    @TableField(value = "create_time", fill = FieldFill.DEFAULT)
    private LocalDateTime createTime;

}
